<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>function</title>
	<script type="text/javascript">
	    //99乘法表
		function multiplication(){
			var str="";
			   for(var i=9 ; i>=1; i--){
			   	     str+='<table ><tr>';
			   	  for( var j=1 ; j<=i ; j++){
			   	   	    var k = i*j;
			   	   	    if(i%2!=0 && j%2==0){
			   	   	    	str+="<td style='width:100px;text-align:center; background-color:#3A59F4;'>"+j+"*"+i+"="+k+"</td>";
			   	     	}else if(i%2==0 && j%2==0){
			   	     		str+="<td style='width:100px;text-align:center; background-color:#D5DBED;'>"+j+"*"+i+"="+k+"</td>";
			   	     	}else{
                            str+="<td style='width:100px;text-align:center; background-color:#FF0000;'>"+j+"*"+i+"="+k+"</td>";
			   	     	}
			   	  }
			   	   str+='</tr></table>';
			   }
			return str;
		}
		document.write(multiplication());
	</script>
</head>
<body>
	  
</body>
</html>